package cn.com.surker.system.service.impl;

import cn.com.surker.system.dao.SysLogDao;
import cn.com.surker.system.entity.SysLog;
import cn.com.surker.system.service.SysLogService;
import cn.com.surker.util.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName SysLogServiceImpl
 * @Description 日志实现接口
 * @Author luotao
 * @Date 2021/9/15 8:50
 * @Version 1.0
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogDao, SysLog> implements SysLogService {


    @Resource
    private SysLogDao mapper;

    /**
     * 清理历史数据
     * @param today
     * @return
     */
    public int clearHistory(String today) {
        if (StringUtils.isNull(today))
            return 0;
        return mapper.clearHistory(today);
    }

}

